import http from '/src/utils/request'

export function getUserCommentList(userId, current, size) {
  return http.get(`/plugins/baliServer-module-article/api/comment?userId=${userId}&current=${current}&size=${size}`)
}

export function getCommentList(entityType, entityId, current, size) {
  return http.get(`/plugins/baliServer-module-article/api/comment?entityType=${entityType}&entityId=${entityId}&current=${current}&size=${size}`)
}

export function postComment(data) {
  return http.post('/plugins/baliServer-module-article/api/comment', data)
}

export function getChildCommentList(current, size, pid) {
  return http.get(`/plugins/baliServer-module-article/api/comment?entityId=${pid}&current=${current}&size=${size}`)
}
